package com.example.ormsqlsplicingframe1.proxy;

import com.example.ormsqlsplicingframe1.session.SessionUtil;
import com.example.ormsqlsplicingframe1.utlis.CopyUtils;
import com.example.ormsqlsplicingframe1.utlis.NodeSqlUtil;
import com.example.ormsqlsplicingframe1.utlis.ProxySessionUtils;
import com.example.ormsqlsplicingframe1.utlis.ProxyTransactionListSessionUtils;
import com.example.ormsqlsplicingframe1.warpper.UpdateSqlWrapper;
import io.swagger.models.auth.In;
import lombok.SneakyThrows;

import java.time.Instant;
import java.util.ArrayList;
import java.util.List;

public class RouteSession extends ProxyBaseTransactionSession {

    public  <E> E proxyObject(E data){
        E proxy =(E) ProxySessionUtils.getEntityProxyService().getProxy(data);
        return proxy;
    }

    @Override
    public void commitTransaction() {
        super.commitTransaction();
        ProxySessionUtils.getEntityProxyService().commitTransaction();
    }


    public  <E> List<E> getList(E data){
        List<E> list =(List<E>)  ProxySessionUtils.getEntityProxyService().getList();
        return list;
    }


}
